
void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop() {
  if (Serial.available()) {
    int in = Serial.read();
  
    if (in == 1) {
      digitalWrite(13, HIGH);
    } else if (in == 0) {
      digitalWrite(13, LOW);
    }
  }
}
